clear
eststo clear
import delimited "NSS.csv"

gen hindu = 0
replace hindu = 1 if religion=="Hinduism"
replace age = "." if age=="NA"
destring age, replace
gen sc = 0
replace sc = 1 if socialgroup=="Scheduled Castes"



sum age
sum hindu
sum male
sum sc

replace mpce_30days = "." if mpce_30days=="NA"
destring mpce_30days, replace

replace hhsize = "." if hhsize=="NA"
destring hhsize, replace

gen educ = .
replace educ = 1 if education==1
replace educ = 1 if education==2
replace educ = 1 if education==3
replace educ = 1 if education==4
replace educ = 1 if education==5
replace educ = 2 if education==6
replace educ = 2 if education==7
replace educ = 3 if education==8
replace educ = 4 if education==9
replace educ = 5 if education==10
replace educ = 6 if education==11
replace educ = 6 if education==12

gen educdum6 = 0
replace educdum6 = 1 if education==11
replace educdum6 = 1 if education==12


svyset hhid [pweight=mlt], strata(stratum)
svy: mean hindu
svy: mean sc
svy: mean age
svy: mean male
svy: mean mpce_30days
svy: mean hhsize
svy: mean education
svy: mean educdum6
